import request from '../utils/request.js';


//查询所有角色
export function findAll(){
  return request({
    url:'/rbacRole/',
    method:'get',
  })
}
//添加角色
export function addOne(data){
  return request({
    url:'/rbacRole/addOne',
    method:'post',
    data
  })
}
//修改角色
export function editOne(data){
  return request({
    url:'/rbacRole/editOne',
    method:'post',
    data
  })
}
//删除角色（实际是status变为n）
export function roleDelete(id){
  return request({
    url:'/rbacRole/roleDelete/'+id,
    method:'post',
  })
}
//查找角色
export function search(data){
  return request({
    url:'/rbacRole/search/'+data.page+'/'+data.limit+'?name='+data.name+'&code='+data.code,
    method:'get',
  })
}

